package com.hxkj.service;

import com.alibaba.fastjson.JSONObject;
import com.hxkj.domain.po.*;
import com.platform.common.domain.result.ResultMessageStruct;
import com.platform.common.domain.result.ResultPageStruct;
import com.platform.common.domain.to.PageTo;

/**
 * Created by hunter on 2018/5/19.
 */
public interface AuthUserService {

    /**
    * @author Mr.zheng
    * @Description getAuthUserBySlave 从从数据库获取符合条件的用户列表
    * @Date 15:43 2018/5/19
    **/
    ResultPageStruct<AllocationAuthUser> getAuthUserBySlave(AuthUser authUser, PageTo pageParam) throws Exception;

    /**
    * @author Mr.zheng
    * @Description getAuthUser 根据用户ID获取用户信息
    * @Date 15:44 2018/5/19
    **/
    JSONObject getAuthUser(AuthUser userAuth) throws Exception;

    /**
    * @author Mr.zheng
    * @Description saveAuthUser 新增用户
    * @Date 15:45 2018/5/19
    **/
    ResultMessageStruct saveAuthUser(AuthUser authUser) throws Exception;



    /**
     * 用户锁示例
     *
     * @param uid
     * @throws Exception
     */
    void userLock(String uid) throws Exception;



    /**
    * @author Mr.zheng
    * @Description updateAuthUser 更新用户信息
    * @Date 9:58 2018/5/21
    **/
    ResultMessageStruct updateAuthUser(AuthUser authUser) throws Exception;

    /**
    * @author Mr.zheng
    * @Description deleteAuthUser 删除用户信息
    * @Date 11:23 2018/5/21
    **/
    ResultMessageStruct deleteAuthUser(AuthUser authUser) throws Exception;

    /**
     * 给用户赋予角色
     */
    ResultMessageStruct addUsertToRole(AuthRole authRole) throws Exception;

    /**
     * 查找所有关联和未关联角色的用户
     * @param authRole
     * @return
     * @throws Exception
     */

    AllocationUser getRoleAssignUser(AuthRole authRole) throws Exception;

    /**
    * @author Mr.zheng
    * @Description updateAuthUserPassword  用户重置密码
    * @Date 15:50 2018/6/26
    **/
    void updateAuthUserPassword(AuthUser authUser) throws Exception;
}
